package com.shop.order.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.shop.order.service.OrderService;
import com.shop.order.vo.OrderVO;

/**
 * request = /rest/CATEGORY/
 * @author geryon
 *
 */
@Controller
@RequestMapping("/ORDER")
public class OrderController {

	private final static int LIST_ROW_CNT = 20; // 게시물 리스트 갯수
	
	@Autowired
	private OrderService service;
	/**
	 * 주문리스트
	 * 리스트 화면을 호출한다
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, value="/")
	public String requestScreen(Model model) {
		return "product/member_list";
	}

	/**
	 * 주문 리스트
	 * @param model
	 * @param member
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, value="/list")
	public Model listOrder(Model model) {
		
		return model;
	}
	
	/**
	 * 주문 등록
	 * @param model
	 * @param member
	 * @return
	 */
	@RequestMapping(method = RequestMethod.POST, value="/add")
	public Model addOrder(Model model,
							@RequestBody OrderVO.OrderItem orderItem) {
		
		return model;
	}

	/**
	 * 주문 상세조회
	 * @param model
	 * @param member
	 * @return
	 */
	@RequestMapping(method = RequestMethod.GET, value="/{seq}")
	public Model getOrder(Model model,
							@PathVariable ("seq") String opt_master_seq) {
		
		return model;
	}

}